"""
将下列列表中大于30的元素存储新的列表 news
"""

nums = [12,32,14,52,36,54,18,25,39,40,27]
news = []
# 传统方式
for num in nums:
    if num > 30:
        news.append(num)

print(news)

# 列表推导式
new2 = [num for num in nums if num > 30]
print(new2)
